don't try to handle alignment here, because it's done by PangoLayout after
authorHavoc Pennington <hp@redhat.com>
Fri, 21 Sep 2001 23:39:21 +0000 (23:39 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Fri, 21 Sep 2001 23:39:21 +0000 (23:39 +0000)
2001-09-20  Havoc Pennington  <hp@redhat.com>

* gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't
try to handle alignment here, because it's done by PangoLayout
after we set the layout width. Fix from Dov.

13 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/reference/gtk/tmpl/gtk-unused.sgml
docs/reference/gtk/tmpl/gtkmenu.sgml
docs/reference/gtk/tmpl/gtkmenuitem.sgml
docs/reference/gtk/tmpl/gtkrc.sgml
docs/reference/gtk/tmpl/gtkwidget.sgml
gtk/gtktextlayout.c

index f33091b8e3380b28110d2174f3af557c98091dcb..279288a631c1b79e521e29304080c7ec64f5582f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-20  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't
+       try to handle alignment here, because it's done by PangoLayout
+       after we set the layout width. Fix from Dov.
+
 2001-09-21  Hans Breuer  <hans@breuer.org>
 
        * gdk/gdk.def :
index f33091b8e3380b28110d2174f3af557c98091dcb..279288a631c1b79e521e29304080c7ec64f5582f 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-20  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't
+       try to handle alignment here, because it's done by PangoLayout
+       after we set the layout width. Fix from Dov.
+
 2001-09-21  Hans Breuer  <hans@breuer.org>
 
        * gdk/gdk.def :
index f33091b8e3380b28110d2174f3af557c98091dcb..279288a631c1b79e521e29304080c7ec64f5582f 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-20  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't
+       try to handle alignment here, because it's done by PangoLayout
+       after we set the layout width. Fix from Dov.
+
 2001-09-21  Hans Breuer  <hans@breuer.org>
 
        * gdk/gdk.def :
index f33091b8e3380b28110d2174f3af557c98091dcb..279288a631c1b79e521e29304080c7ec64f5582f 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-20  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't
+       try to handle alignment here, because it's done by PangoLayout
+       after we set the layout width. Fix from Dov.
+
 2001-09-21  Hans Breuer  <hans@breuer.org>
 
        * gdk/gdk.def :
index f33091b8e3380b28110d2174f3af557c98091dcb..279288a631c1b79e521e29304080c7ec64f5582f 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-20  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't
+       try to handle alignment here, because it's done by PangoLayout
+       after we set the layout width. Fix from Dov.
+
 2001-09-21  Hans Breuer  <hans@breuer.org>
 
        * gdk/gdk.def :
index f33091b8e3380b28110d2174f3af557c98091dcb..279288a631c1b79e521e29304080c7ec64f5582f 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-20  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't
+       try to handle alignment here, because it's done by PangoLayout
+       after we set the layout width. Fix from Dov.
+
 2001-09-21  Hans Breuer  <hans@breuer.org>
 
        * gdk/gdk.def :
index f33091b8e3380b28110d2174f3af557c98091dcb..279288a631c1b79e521e29304080c7ec64f5582f 100644 (file)
@@ -1,3 +1,9 @@
+2001-09-20  Havoc Pennington  <hp@redhat.com>
+
+       * gtk/gtktextlayout.c (gtk_text_layout_get_line_display): don't
+       try to handle alignment here, because it's done by PangoLayout
+       after we set the layout width. Fix from Dov.
+
 2001-09-21  Hans Breuer  <hans@breuer.org>
 
        * gdk/gdk.def :
index a745705aa66fe9240ae9f4f178ea910427391479..b6ac0926fa44b68a2e50af87690e6504c782137a 100644 (file)
@@ -1793,6 +1793,19 @@ arrow.
 @show_toggle_indicator: unused
 @show_submenu_indicator: whether to show the arrow or not
 
+<!-- ##### FUNCTION gtk_menu_item_set_placement ##### -->
+<para>
+Specifies the placement of the submenu around the menu item. The placement
+is usually #GTK_LEFT_RIGHT for menu items in a popup menu and
+#GTK_TOP_BOTTOM in menu bars.
+</para>
+<para>
+This function is useless in usual applications.
+</para>
+
+@menu_item: the menu item
+@placement: the submenu placement
+
 <!-- ##### FUNCTION gtk_object_arg_get ##### -->
 <para>
 Private function to get an argument and argument info from an object.
@@ -2480,6 +2493,15 @@ fundamental type.
 @group_cycling: 
 @Returns: 
 
+<!-- ##### FUNCTION gtk_widget_get_usize ##### -->
+<para>
+
+</para>
+
+@widget: 
+@width: 
+@height: 
+
 <!-- ##### FUNCTION gtk_widget_pop_style ##### -->
 <para>
 
index 13e9c079dd85987723cc0d34bff3e8ea42ba98b6..e9a9ccfcf91b7d52df5373620302f752adae8ab3 100644 (file)
@@ -96,9 +96,9 @@ Creates a new #GtkMenu.
 Adds a new #GtkMenuItem to the end of the menu's item list.
 </para>
 
+<!-- # Unused Parameters # -->
 @menu: a #GtkMenu.
 @child: The #GtkMenuItem to add.
-<!-- # Unused Parameters # -->
 @m: 
 @c: 
 
@@ -108,8 +108,8 @@ Adds a new #GtkMenuItem to the end of the menu's item list.
 Adds a new #GtkMenuItem to the beginning of the menu's item list.
 </para>
 
-@menu_child: 
 <!-- # Unused Parameters # -->
+@menu_child: 
 @m: 
 @c: 
 @menu: a #GtkMenu.
@@ -122,10 +122,10 @@ Adds a new #GtkMenuItem to the menu's item list at the position
 indicated by @position. 
 </para>
 
+<!-- # Unused Parameters # -->
 @menu: a #GtkMenu.
 @child: The #GtkMenuItem to add.
 @pos: 
-<!-- # Unused Parameters # -->
 @position: The position in the item list where @child is added.
 Positions are numbered from 0 to n-1.
 
index 286ab7b6d6ff17ff8060bb35b498f6a2c764499a..9694f0822cd0aa0a22eea21c5e33687f7725b97d 100644 (file)
@@ -91,20 +91,6 @@ Removes the widget's submenu.
 @menu_item: the menu item widget
 
 
-<!-- ##### FUNCTION gtk_menu_item_set_placement ##### -->
-<para>
-Specifies the placement of the submenu around the menu item. The placement
-is usually #GTK_LEFT_RIGHT for menu items in a popup menu and
-#GTK_TOP_BOTTOM in menu bars.
-</para>
-<para>
-This function is useless in usual applications.
-</para>
-
-@menu_item: the menu item
-@placement: the submenu placement
-
-
 <!-- ##### FUNCTION gtk_menu_item_select ##### -->
 <para>
 Emits the "select" signal on the given item. Behaves exactly like
index cc0b23b6d217a6b8beefca09d47e350a7eb6068a..30ffca8235aa804f9d0033f0f1ed9b6a61d8fd94 100644 (file)
@@ -495,7 +495,6 @@ This can later be composited together with other
 #GtkRcStyle structures to form a #GtkStyle.
 </para>
 
-@parent_instance: 
 @name: 
 @bg_pixmap_name: 
 @font_desc: 
index 8d6c08c9a57208b2194e1d04bc8e49381887f41c..b360b44d7a6f852e6f9cad1c5855ededaaa4c37f 100644 (file)
@@ -1372,16 +1372,6 @@ GtkWidget
 @height: 
 
 
-<!-- ##### FUNCTION gtk_widget_get_usize ##### -->
-<para>
-
-</para>
-
-@widget: 
-@width: 
-@height: 
-
-
 <!-- ##### MACRO gtk_widget_pop_visual ##### -->
 <para>
 
index 62ac18c6f4f6f5e66a217d227007d96a68ff2408..2b77c91b3c913762f5d3c0e33775445cac6e7862 100644 (file)
@@ -1097,8 +1097,7 @@ totally_invisible_line (GtkTextLayout *layout,
 static void
 set_para_values (GtkTextLayout      *layout,
                  GtkTextAttributes *style,
-                 GtkTextLineDisplay *display,
-                 gdouble            *align)
+                 GtkTextLineDisplay *display)
 {
   PangoAlignment pango_align = PANGO_ALIGN_LEFT;
   int layout_width;
@@ -1129,19 +1128,6 @@ set_para_values (GtkTextLayout      *layout,
       break;
     }
 
-  switch (pango_align)
-    {
-    case PANGO_ALIGN_LEFT:
-      *align = 0.0;
-      break;
-    case PANGO_ALIGN_RIGHT:
-      *align = 1.0;
-      break;
-    case PANGO_ALIGN_CENTER:
-      *align = 0.5;
-      break;
-    }
-
   pango_layout_set_alignment (display->layout, pango_align);
   pango_layout_set_spacing (display->layout,
                             style->pixels_inside_wrap * PANGO_SCALE);
@@ -1670,7 +1656,6 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout,
   gchar *text;
   PangoAttrList *attrs;
   gint text_allocated, layout_byte_offset, buffer_byte_offset;
-  gdouble align;
   PangoRectangle extents;
   gboolean para_values_set = FALSE;
   GSList *cursor_byte_offsets = NULL;
@@ -1739,7 +1724,7 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout,
            */
           if (!para_values_set)
             {
-              set_para_values (layout, style, display, &align);
+              set_para_values (layout, style, display);
               para_values_set = TRUE;
             }
 
@@ -1908,7 +1893,7 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout,
   if (!para_values_set)
     {
       style = get_style (layout, &iter);
-      set_para_values (layout, style, display, &align);
+      set_para_values (layout, style, display);
       release_style (layout, style);
     }
   
@@ -1955,8 +1940,6 @@ gtk_text_layout_get_line_display (GtkTextLayout *layout,
 
   pango_layout_get_extents (display->layout, NULL, &extents);
 
-  display->x_offset += (display->total_width - PANGO_PIXELS (extents.x + extents.width)) * align;
-
   display->width = PANGO_PIXELS (extents.width) + display->left_margin + display->right_margin;
   display->height += PANGO_PIXELS (extents.height);